home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / tffdsply.hqx / tiffinfo.h < prev    next >
Text File  |  1993-01-04  |  1KB  |  54 lines

  1. /*
  2.  * This software is copyright 1992 by Robert Morris.
  3.  * You may freely redistribute this software as shareware
  4.  * if you do so in the same form as you got it. If you find
  5.  * this software useful, please send $12 to:
  6.  *   Robert Morris
  7.  *   P.O. Box 1044
  8.  *   Harvard Square Station
  9.  *   Cambridge, MA 02238
  10.  *   ecognome@aol.com
  11.  * If you incorporate any of this software in any kind of
  12.  * commercial product, please send $2 per copy distributed
  13.  * to the above address.
  14.  */
  15.  
  16. /*
  17.  * an interface for using TIFF files with QuickDraw.
  18.  */
  19.  
  20. #include "tiff.h"
  21.  
  22. /*
  23.  * record of relevant information gained by scanning the TIFF fields.
  24.  */
  25. struct TIFFInfo{
  26.     short ref; /* Mac file reference */
  27.     short byteOrder; /* LittleEndian or BigEndian */
  28.     long offset; /* of this Image File Directory */
  29.     long nextOffset; /* of next Image File Directory */
  30.     OSErr err;
  31.     Str255 errStr;
  32.     
  33.     long *bitsPerSample; /* [samplesPerPixel] */
  34.     CTabHandle colorMap;
  35.     long compression;
  36.     long predictor;
  37.     long imageLength;
  38.     long imageWidth;
  39.     long photometricInterpretation;
  40.     long planarConfiguration;
  41.     long rowsPerStrip;
  42.     long samplesPerPixel;
  43.     long *stripByteCounts;
  44.     long stripsPerImage;
  45.     long *stripOffsets; /* [# of strips] */
  46. };
  47. typedef struct TIFFInfo *TIFFPtr;
  48.  
  49. TIFFPtr ScanTIFF(int ref);
  50. void DisposeTIFF(TIFFPtr);
  51. OSErr DrawTIFF(int ref, TIFFPtr ti, Rect sr, Rect dr, int dither);
  52. OSErr GetTIFFError(TIFFPtr, StringPtr);
  53. int UnLZW(char *in, long inlen, char *out, long outlen);
  54. Boolean TIFFDrawable();